package vn.edu.nuce.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="lich_dang_ky")
public class LichDangKy {

	private String id;
	private String idPhong;
	private String idTietHoc;
	private String tieuDe;
	private String moTa;
	private int status;
	private String idGiaoVien;
	private Date ngayDat;
	private String yeuCau;
	private String emailLop;
	private String lyDoHuy;
	private String tenPhongMay;
	private String moTaTietHoc;
	private String tenGiaoVien;
	
	public LichDangKy(){
		idTietHoc = "1";
		idPhong = "1";
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		try {
			Date dateWithoutTime = sdf.parse(sdf.format(new Date()));
			ngayDat = dateWithoutTime;
		} catch (ParseException e) {
			ngayDat = new Date();
			e.printStackTrace();
		}
	}
	@Id
	@Column(name="id", unique=true, nullable=false)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Column(name="id_phong")
	public String getIdPhong() {
		return idPhong;
	}
	public void setIdPhong(String idPhong) {
		this.idPhong = idPhong;
	}
	@Column(name="tieu_de")
	public String getTieuDe() {
		return tieuDe;
	}
	public void setTieuDe(String tieuDe) {
		this.tieuDe = tieuDe;
	}
	@Column(name="id_tiet_hoc")
	public String getIdTietHoc() {
		return idTietHoc;
	}
	public void setIdTietHoc(String idTietHoc) {
		this.idTietHoc = idTietHoc;
	}
	@Column(name="mo_ta")
	public String getMoTa() {
		return moTa;
	}
	public void setMoTa(String moTa) {
		this.moTa = moTa;
	}
	@Column(name="email_lop")
	public String getEmailLop() {
		return emailLop;
	}
	public void setEmailLop(String emailLop) {
		this.emailLop = emailLop;
	}
	
	@Column(name="status")
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	@Column(name="id_giao_vien")
	public String getIdGiaoVien() {
		return idGiaoVien;
	}
	public void setIdGiaoVien(String idGiaoVien) {
		this.idGiaoVien = idGiaoVien;
	}
	@Column(name="ngay_dat")
	public Date getNgayDat() {
		return ngayDat;
	}
	public void setNgayDat(Date ngayDat) {
		this.ngayDat = ngayDat;
	}
	@Column(name="yeu_cau")
	public String getYeuCau() {
		return yeuCau;
	}
	public void setYeuCau(String yeuCau) {
		this.yeuCau = yeuCau;
	}
	@Column(name="ly_do_huy")
	public String getLyDoHuy() {
		return lyDoHuy;
	}
	public void setLyDoHuy(String lyDoHuy) {
		this.lyDoHuy = lyDoHuy;
	}
	@Column(name="ten_phong_may")
	public String getTenPhongMay() {
		return tenPhongMay;
	}
	public void setTenPhongMay(String tenPhongMay) {
		this.tenPhongMay = tenPhongMay;
	}
	@Column(name="mo_ta_tiet_hoc")
	public String getMoTaTietHoc() {
		return moTaTietHoc;
	}
	public void setMoTaTietHoc(String moTaTietHoc) {
		this.moTaTietHoc = moTaTietHoc;
	}
	@Column(name="ten_giao_vien")
	public String getTenGiaoVien() {
		return tenGiaoVien;
	}
	public void setTenGiaoVien(String tenGiaoVien) {
		this.tenGiaoVien = tenGiaoVien;
	}
	
	
	
	
}
